package com.fh.enums;

public enum ResultEnum {
    SUCCESS_ADD(0, "新增成功"),
    SUCCESS_DELETE(0, "删除成功"),
    SUCCESS_UPDATE(0, "修改成功"),
    SUCCESS_SELECT(0, "查询成功"),
    SUCCESS_PHONE(0, "发送成功"),
    SUCCESS_REGISTER(0, "注册成功"),
    SUCCESS_LOGIN(0, "登录成功"),


    ERROR_MSG(1, "验证码不正确"),
    ERROR_PHONE(1, "1分钟只能发送一次短信"),
    ERROR_PHONE2(1, "超过次数限制"),
    ERROR_SYS(1, "系统错误"),
    ERROR_LOGIN(-1, "请先登录");
    private Integer code;//返回值
    private String msg;//信息

    ResultEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
